﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class DesShell : MonoBehaviour {

    public GameObject shellesplosionprefab;
    public AudioClip shellExp;

    public void OnTriggerEnter(Collider collider) {
        AudioSource.PlayClipAtPoint(shellExp, transform.position);
        GameObject.Instantiate(shellesplosionprefab,transform.position,transform.rotation);
        GameObject.Destroy(this.gameObject);

        if (collider.tag=="tank")
        {
           collider.SendMessage("isTank");
        }
    }
}
